CREATE TABLE [dbo].[wlp_campos_programa]
(
[nm_programa] [dbo].[_codigo_largo] NOT NULL,
[nm_campo] [dbo].[_nombre] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[wlp_campos_programa] ADD CONSTRAINT [PK_wlp_campos_programa] PRIMARY KEY NONCLUSTERED  ([nm_programa], [nm_campo]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [FK_nm_campo] ON [dbo].[wlp_campos_programa] ([nm_campo]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [FK_nm_programa] ON [dbo].[wlp_campos_programa] ([nm_programa]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[wlp_campos_programa] ADD CONSTRAINT [FK_wlp_campos_programa_wad_campos] FOREIGN KEY ([nm_campo]) REFERENCES [dbo].[wad_campos] ([nm_campo]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[wlp_campos_programa] ADD CONSTRAINT [FK_wlp_campos_programa_wad_programas] FOREIGN KEY ([nm_programa]) REFERENCES [dbo].[wad_programas] ([nm_programa]) ON DELETE CASCADE
GO
